<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8"	contentType="text/html; charset=utf-8"%>
<%@include file="/quick/include/common.jsp"%>
<c:set var="buttons">
	<input type="button" style="margin-right: 5px" onclick="f_add()"		value="<fmt:message key="button.add"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_update()"		value="<fmt:message key="button.update"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_delete()"		value="<fmt:message key="button.delete"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_cancel()"		value="<fmt:message key="button.cancel"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_save()"		value="<fmt:message key="button.save"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_query()"		value="<fmt:message key="button.query"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_fields()"		value="<fmt:message key="button.field"/>" />
</c:set>
<div id='toolbar' style="display:none">
	<c:out value="${buttons}" escapeXml="false" />
</div>

<c:set var="buttons">
	<input type="button" style="margin-right: 5px" onclick="f_add('COLUMN_DEF')"		value="<fmt:message key="button.add"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_update('COLUMN_DEF')"		value="<fmt:message key="button.update"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_delete('COLUMN_DEF')"		value="<fmt:message key="button.delete"/>" />
	<input type="button" style="margin-right: 5px" onclick="f_cancel('COLUMN_DEF')"		value="<fmt:message key="button.cancel"/>" />
</c:set>
<div id='subToolbar' style="display:none">
	<c:out value="${buttons}" escapeXml="false" />
</div>





<script>
Ext.onReady(globalScope._ready);
<c:if test='${not empty model.parentId}'>
function f_back(){
   globalScope._back();
}
</c:if>


function f_add(tableName){
  globalScope._add(tableName);
}

function f_update(tableName){
  globalScope._update(tableName);
}

function f_delete(tableName){
  globalScope._delete(tableName);
} 

function f_cancel(tableName){
  globalScope._cancel(tableName);
}

function f_save(tableName,url){
  globalScope._save(tableName,url);
}

function f_query(tableName){
    globalScope._query(tableName);
}

function f_gotoPage(pageNo,rowsOfPage,pageCount,rowCount,conditoin){
  go(pageNo,rowsOfPage,pageCount,conditoin);
//  globalScope._gotoPage({spanName:"g_pageSpan_<c:out value='${model.tableName}'/>",pageNo:pageNo,rowsOfPage:rowsOfPage,pageCount:pageCount,rowCount:rowCount,condition:conditoin,tableName:"<c:out value='${model.tableName}'/>"});
}
</script>
